using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Diagnostics;

namespace Emlyn.Applications.LochAlarm
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmMain frm = new frmMain();

            if (args.Length > 0 && args[0].ToUpper() == "/RESTART")
            {
                Process.Start(Application.ExecutablePath);
            }
            else if (!frm.CheckForUpdatesAndUpdateIfNecessary())
            {
                Application.Run(frm);
            }
        }
    }
}